#pragma once

#include "RBTree.h"

namespace xsc
{
	template<typename K>
	class set
	{
		struct KeyOfT
		{
			const K& operator()(const K& key)
			{
				return key;
			}
		};

		typedef typename RBTree<K, const K, KeyOfT>::Iterator iterator;
		typedef typename RBTree<K, const K, KeyOfT>::Const_Iterator const_iterator;

	public:
		iterator begin()
		{
			return tree.Begin();
		}

		iterator end()
		{
			return tree.End();
		}

		const_iterator begin() const
		{
			return tree.Begin();
		}

		const_iterator end() const
		{
			return tree.End();
		}

		pair<iterator,bool> insert(const K& key) 
		{
			return tree.Insert(key);
		}

	private:
		RBTree<K,const K, KeyOfT> tree;
	};
}